package com.gxa.www.cl.mapper;

import com.gxa.www.cl.domain.entity.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {
    int insert(Employee employee);

    @Select("SELECT MAX(user_id) FROM 管理员信息表")
    Integer getMaxUserIdFromAdminTable();

    @Select("SELECT * FROM 员工信息表")
    List<Employee> selectAll();

    @Delete("DELETE FROM 员工信息表 WHERE id = #{id}")
    int deleteById(int id);
}

